import request from '@/config/axios'

export interface LabelSetVO {
        id: number
        name: string
        sort: number
        scope: string
        remark: string
}

// 查询客户标签集列表
export const getLabelSetPage = async (params) => {
    return await request.get({url: `/crm/label-set/page`, params})
}

// 查询客户标签集详情
export const getLabelSet = async (id: number) => {
    return await request.get({url: `/crm/label-set/get?id=` + id})
}

// 新增客户标签集
export const createLabelSet = async (data: LabelSetVO) => {
    return await request.post({url: `/crm/label-set/create`, data})
}

// 修改客户标签集
export const updateLabelSet = async (data: LabelSetVO) => {
    return await request.put({url: `/crm/label-set/update`, data})
}

// 删除客户标签集
export const deleteLabelSet = async (id: number) => {
    return await request.delete({url: `/crm/label-set/delete?id=` + id})
}

// 导出客户标签集 Excel
export const exportLabelSet = async (params) => {
    return await request.download({url: `/crm/label-set/export-excel`, params})
}